package com.yljk.imdoctor.entity;

import com.yilijk.base.utils.DataUtils;

import java.text.ParseException;
import java.util.List;

public class OldConversationBean{


    /**
     * result : true
     * msg : null
     * data : {"doctorImMsgList":[{"chargesListId":6693,"inquiringPatientId":534,"chargesListStatus":3,"patientId":108084693368833,"name":"儿童测试","gender":"男","age":11,"patientImAccount":"user_hospital_108084693368833","updateTime":"2021-05-12 14:10:00","imRecordHbaseDTO":{"chargesListId":6693,"fromAccountId":"doctor_213","fromUserId":"213","toAccountId":"user_hospital_108084693368833","toUserId":"108084693368833","doctorId":213,"patientId":108084693368833,"inquiringPatientId":534,"convType":0,"msgType":100,"content":null,"msgTimeStamp":1620734219983,"msgIdClient":"1103201016041605#demo_872606014271129740","msgIdServer":"872606014271129740","createTime":1620734220000,"sourceFileUrl":null,"sourceFileExt":null,"ext":"{\"inquiringPatientId\":534,\"chargesListId\":6693,\"patientId\":108084693368833,\"doctorId\":213,\"extType\":\"charges\"}","attach":"{\"customExts\":[{\"status\":\"3\"},{\"endTime\":\"1620734220000\"},{\"content\":\"您好，请您对我的问诊服务做出评价\"},{\"chargesListId\":\"6693\"}],\"customEvent\":\"to_evaluate\",\"type\":\"custom\"}","fileUrl":null,"customEvent":"to_evaluate","customExt":"[{\"status\":\"3\"},{\"endTime\":\"1620734220000\"},{\"content\":\"您好，请您对我的问诊服务做出评价\"},{\"chargesListId\":\"6693\"}]","fileName":null,"del":false}}],"totalCount":36,"totalPageCount":36,"hasNextPage":true}
     */

    private boolean result;
    private String msg;

    /**
     * doctorImMsgList : [{"chargesListId":6693,"inquiringPatientId":534,"chargesListStatus":3,"patientId":108084693368833,"name":"儿童测试","gender":"男","age":11,"patientImAccount":"user_hospital_108084693368833","updateTime":"2021-05-12 14:10:00","imRecordHbaseDTO":{"chargesListId":6693,"fromAccountId":"doctor_213","fromUserId":"213","toAccountId":"user_hospital_108084693368833","toUserId":"108084693368833","doctorId":213,"patientId":108084693368833,"inquiringPatientId":534,"convType":0,"msgType":100,"content":null,"msgTimeStamp":1620734219983,"msgIdClient":"1103201016041605#demo_872606014271129740","msgIdServer":"872606014271129740","createTime":1620734220000,"sourceFileUrl":null,"sourceFileExt":null,"ext":"{\"inquiringPatientId\":534,\"chargesListId\":6693,\"patientId\":108084693368833,\"doctorId\":213,\"extType\":\"charges\"}","attach":"{\"customExts\":[{\"status\":\"3\"},{\"endTime\":\"1620734220000\"},{\"content\":\"您好，请您对我的问诊服务做出评价\"},{\"chargesListId\":\"6693\"}],\"customEvent\":\"to_evaluate\",\"type\":\"custom\"}","fileUrl":null,"customEvent":"to_evaluate","customExt":"[{\"status\":\"3\"},{\"endTime\":\"1620734220000\"},{\"content\":\"您好，请您对我的问诊服务做出评价\"},{\"chargesListId\":\"6693\"}]","fileName":null,"del":false}}]
     * totalCount : 36
     * totalPageCount : 36
     * hasNextPage : true
     */

    private DataBean data;

    public boolean isResult() {
        return result;
    }

    public void setResult(boolean result) {
        this.result = result;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public DataBean getData() {
        return data;
    }

    public void setData(DataBean data) {
        this.data = data;
    }
    public static class DataBean {
        private int totalCount;
        private int totalPageCount;
        private boolean hasNextPage;
        /**
         * chargesListId : 6693
         * inquiringPatientId : 534
         * chargesListStatus : 3
         * patientId : 108084693368833
         * name : 儿童测试
         * gender : 男
         * age : 11
         * patientImAccount : user_hospital_108084693368833
         * updateTime : 2021-05-12 14:10:00
         * imRecordHbaseDTO : {"chargesListId":6693,"fromAccountId":"doctor_213","fromUserId":"213","toAccountId":"user_hospital_108084693368833","toUserId":"108084693368833","doctorId":213,"patientId":108084693368833,"inquiringPatientId":534,"convType":0,"msgType":100,"content":null,"msgTimeStamp":1620734219983,"msgIdClient":"1103201016041605#demo_872606014271129740","msgIdServer":"872606014271129740","createTime":1620734220000,"sourceFileUrl":null,"sourceFileExt":null,"ext":"{\"inquiringPatientId\":534,\"chargesListId\":6693,\"patientId\":108084693368833,\"doctorId\":213,\"extType\":\"charges\"}","attach":"{\"customExts\":[{\"status\":\"3\"},{\"endTime\":\"1620734220000\"},{\"content\":\"您好，请您对我的问诊服务做出评价\"},{\"chargesListId\":\"6693\"}],\"customEvent\":\"to_evaluate\",\"type\":\"custom\"}","fileUrl":null,"customEvent":"to_evaluate","customExt":"[{\"status\":\"3\"},{\"endTime\":\"1620734220000\"},{\"content\":\"您好，请您对我的问诊服务做出评价\"},{\"chargesListId\":\"6693\"}]","fileName":null,"del":false}
         */

        private List<DoctorImMsgListBean> doctorImMsgList;

        public int getTotalCount() {
            return totalCount;
        }

        public void setTotalCount(int totalCount) {
            this.totalCount = totalCount;
        }

        public int getTotalPageCount() {
            return totalPageCount;
        }

        public void setTotalPageCount(int totalPageCount) {
            this.totalPageCount = totalPageCount;
        }

        public boolean isHasNextPage() {
            return hasNextPage;
        }

        public void setHasNextPage(boolean hasNextPage) {
            this.hasNextPage = hasNextPage;
        }

        public List<DoctorImMsgListBean> getDoctorImMsgList() {
            return doctorImMsgList;
        }

        public void setDoctorImMsgList(List<DoctorImMsgListBean> doctorImMsgList) {
            this.doctorImMsgList = doctorImMsgList;
        }

        public static class DoctorImMsgListBean implements Comparable<OldConversationBean.DataBean.DoctorImMsgListBean>  {
            private int UnReadCount;

            public int getUnReadCount() {
                return UnReadCount;
            }

            public void setUnReadCount(int unReadCount) {
                UnReadCount = unReadCount;
            }

            private int chargesListId;
            private int inquiringPatientId;
            private int chargesListStatus;
            private long patientId;
            private String name;
            private String gender;
            private int age;
            private String patientImAccount;
            private String updateTime;
            /**
             * chargesListId : 6693
             * fromAccountId : doctor_213
             * fromUserId : 213
             * toAccountId : user_hospital_108084693368833
             * toUserId : 108084693368833
             * doctorId : 213
             * patientId : 108084693368833
             * inquiringPatientId : 534
             * convType : 0
             * msgType : 100
             * content : null
             * msgTimeStamp : 1620734219983
             * msgIdClient : 1103201016041605#demo_872606014271129740
             * msgIdServer : 872606014271129740
             * createTime : 1620734220000
             * sourceFileUrl : null
             * sourceFileExt : null
             * ext : {"inquiringPatientId":534,"chargesListId":6693,"patientId":108084693368833,"doctorId":213,"extType":"charges"}
             * attach : {"customExts":[{"status":"3"},{"endTime":"1620734220000"},{"content":"您好，请您对我的问诊服务做出评价"},{"chargesListId":"6693"}],"customEvent":"to_evaluate","type":"custom"}
             * fileUrl : null
             * customEvent : to_evaluate
             * customExt : [{"status":"3"},{"endTime":"1620734220000"},{"content":"您好，请您对我的问诊服务做出评价"},{"chargesListId":"6693"}]
             * fileName : null
             * del : false
             */

            private ImRecordHbaseDTOBean imRecordHbaseDTO;

            public int getChargesListId() {
                return chargesListId;
            }

            public void setChargesListId(int chargesListId) {
                this.chargesListId = chargesListId;
            }

            public int getInquiringPatientId() {
                return inquiringPatientId;
            }

            public void setInquiringPatientId(int inquiringPatientId) {
                this.inquiringPatientId = inquiringPatientId;
            }

            public int getChargesListStatus() {
                return chargesListStatus;
            }

            public void setChargesListStatus(int chargesListStatus) {
                this.chargesListStatus = chargesListStatus;
            }

            public long getPatientId() {
                return patientId;
            }

            public void setPatientId(long patientId) {
                this.patientId = patientId;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getGender() {
                return gender;
            }

            public void setGender(String gender) {
                this.gender = gender;
            }

            public int getAge() {
                return age;
            }

            public void setAge(int age) {
                this.age = age;
            }

            public String getPatientImAccount() {
                return patientImAccount;
            }

            public void setPatientImAccount(String patientImAccount) {
                this.patientImAccount = patientImAccount;
            }

            public String getUpdateTime() {
                return updateTime;
            }

            public void setUpdateTime(String updateTime) {
                this.updateTime = updateTime;
            }

            public ImRecordHbaseDTOBean getImRecordHbaseDTO() {
                return imRecordHbaseDTO;
            }

            public void setImRecordHbaseDTO(ImRecordHbaseDTOBean imRecordHbaseDTO) {
                this.imRecordHbaseDTO = imRecordHbaseDTO;
            }

            @Override
            public int compareTo(OldConversationBean.DataBean.DoctorImMsgListBean doctorImMsgListBean) {
                int l0 = 0;
                long l1 = DataUtils.string2long(this.getUpdateTime(), DataUtils.Type1);
                long l2 = DataUtils.string2long(doctorImMsgListBean.getUpdateTime(), DataUtils.Type1);
                long l = l2 - l1;
                if (l>0){
                    l0 = 1;
                }
                if (l<0){
                    l0 = -1;
                }
                if (l == 0){
                    l0 = 0;
                }
                return l0;
            }

            public static class ImRecordHbaseDTOBean {
                private int chargesListId;
                private String fromAccountId;
                private String fromUserId;
                private String toAccountId;
                private String toUserId;
                private int doctorId;
                private long patientId;
                private int inquiringPatientId;
                private int convType;
                private int msgType;
                private String content;
                private long msgTimeStamp;
                private String msgIdClient;
                private String msgIdServer;
                private long createTime;
                private String sourceFileUrl;
                private String sourceFileExt;
                private String ext;
                private String attach;
                private String fileUrl;
                private String customEvent;
                private String customExt;
                private String fileName;
                private boolean del;



                public int getChargesListId() {
                    return chargesListId;
                }

                public void setChargesListId(int chargesListId) {
                    this.chargesListId = chargesListId;
                }

                public String getFromAccountId() {
                    return fromAccountId;
                }

                public void setFromAccountId(String fromAccountId) {
                    this.fromAccountId = fromAccountId;
                }

                public String getFromUserId() {
                    return fromUserId;
                }

                public void setFromUserId(String fromUserId) {
                    this.fromUserId = fromUserId;
                }

                public String getToAccountId() {
                    return toAccountId;
                }

                public void setToAccountId(String toAccountId) {
                    this.toAccountId = toAccountId;
                }

                public String getToUserId() {
                    return toUserId;
                }

                public void setToUserId(String toUserId) {
                    this.toUserId = toUserId;
                }

                public int getDoctorId() {
                    return doctorId;
                }

                public void setDoctorId(int doctorId) {
                    this.doctorId = doctorId;
                }

                public long getPatientId() {
                    return patientId;
                }

                public void setPatientId(long patientId) {
                    this.patientId = patientId;
                }

                public int getInquiringPatientId() {
                    return inquiringPatientId;
                }

                public void setInquiringPatientId(int inquiringPatientId) {
                    this.inquiringPatientId = inquiringPatientId;
                }

                public int getConvType() {
                    return convType;
                }

                public void setConvType(int convType) {
                    this.convType = convType;
                }

                public int getMsgType() {
                    return msgType;
                }

                public void setMsgType(int msgType) {
                    this.msgType = msgType;
                }

                public String getContent() {
                    return content;
                }

                public void setContent(String content) {
                    this.content = content;
                }

                public long getMsgTimeStamp() {
                    return msgTimeStamp;
                }

                public void setMsgTimeStamp(long msgTimeStamp) {
                    this.msgTimeStamp = msgTimeStamp;
                }

                public String getMsgIdClient() {
                    return msgIdClient;
                }

                public void setMsgIdClient(String msgIdClient) {
                    this.msgIdClient = msgIdClient;
                }

                public String getMsgIdServer() {
                    return msgIdServer;
                }

                public void setMsgIdServer(String msgIdServer) {
                    this.msgIdServer = msgIdServer;
                }

                public long getCreateTime() {
                    return createTime;
                }

                public void setCreateTime(long createTime) {
                    this.createTime = createTime;
                }

                public String getSourceFileUrl() {
                    return sourceFileUrl;
                }

                public void setSourceFileUrl(String sourceFileUrl) {
                    this.sourceFileUrl = sourceFileUrl;
                }

                public String getSourceFileExt() {
                    return sourceFileExt;
                }

                public void setSourceFileExt(String sourceFileExt) {
                    this.sourceFileExt = sourceFileExt;
                }

                public String getExt() {
                    return ext;
                }

                public void setExt(String ext) {
                    this.ext = ext;
                }

                public String getAttach() {
                    return attach;
                }

                public void setAttach(String attach) {
                    this.attach = attach;
                }

                public String getFileUrl() {
                    return fileUrl;
                }

                public void setFileUrl(String fileUrl) {
                    this.fileUrl = fileUrl;
                }

                public String getCustomEvent() {
                    return customEvent;
                }

                public void setCustomEvent(String customEvent) {
                    this.customEvent = customEvent;
                }

                public String getCustomExt() {
                    return customExt;
                }

                public void setCustomExt(String customExt) {
                    this.customExt = customExt;
                }

                public String getFileName() {
                    return fileName;
                }

                public void setFileName(String fileName) {
                    this.fileName = fileName;
                }

                public boolean isDel() {
                    return del;
                }

                public void setDel(boolean del) {
                    this.del = del;
                }
            }
        }
    }
}
